The term database can refer to a collection of data and/or data structures typically stored in a digital form. Data can be stored in a database for various reasons and to serve various entities or “users.” Generally, data stored in the database can be used by the database users. A user of a database can, for example, be a person, a database administrator, a computer application designed to interact with a database, etc. A very simple database or database system can, for example, be provided on a Personal Computer (PC) by storing data on a Hard Disk (e.g., contact information) and executing a computer program that allows access to the data. The executable computer program can be referred to as a database program or a database management program. The executable computer program can, for example, retrieve and display data (e.g., a list of names with their phone numbers) based on a request submitted by a person (e.g., show me the phone numbers of all my friends in Ohio).
Generally, database systems are much more complex than the example noted above. In addition, databases have been evolved over the years and some databases that are for various business and organizations (e.g., banks, retail stores, governmental agencies, universities) in use today can be very complex and support several users simultaneously by providing very complex queries (e.g., give me the name of all customers under the age of thirty five (35) in Ohio that have bought all items in a list of items in the past month in Ohio and also have bought ticket for a baseball game in San Diego and purchased a baseball in the past 10 years).
Typically, a Database Manager (DM) or a Database Management System (DBMS) is provided for relatively large and/or complex databases. As known in the art, a DBMS can effectively manage the database or data stored in a database, and serve as an interface for the users of the database. A DBMS can be provided as an executable computer program (or software) product as is also known in the art.
It should also be noted that a database can be organized in accordance with a Data Model. Notable Data Models include a Relational Model, an Entity-relationship model, and an Object Model. The design and maintenance of a complex database can require highly specialized knowledge and skills by database application programmers, DBMS developers/programmers, database administrators (DBAs), etc. To assist in design and maintenance of a complex database, various tools can be provided, either as part of the DBMS or as free-standing (stand-alone) software products. These tools can include specialized Database languages (e.g., Data Description Languages, Data Manipulation Languages, Query Languages). Database languages can be specific to one data model or to one DBMS type. One widely supported language is Structured Query Language (SQL) developed, by in large, for Relational Model and can combine the roles of Data Description Language, Data Manipulation language, and a Query Language.
Today, databases have become prevalent in virtually all aspects of business and personal life. Moreover, database use is likely to continue to grow even more rapidly and widely across all aspects of commerce. Generally, databases and DBMS that manage them can be very large and extremely complex partly in order to support an ever increasing need to store data and analyze data. Typically, larger databases are used by larger organizations. Larger databases are supported by a relatively large amount of capacity, including computing capacity (e.g., processor and memory) to allow them to perform many tasks and/or complex tasks effectively at the same time (or in parallel). On the other hand, smaller databases systems are also available today and can be used by smaller organizations. In contrast to larger databases, smaller databases can operate with less capacity.
A popular type of database is the relational Database Management System (RDBMS), which includes relational tables, also referred to as relations, made up of rows and columns (also referred to as tuples and attributes). Each row represents an occurrence of an entity defined by a table, with an entity being a person, place, thing, or other object about which the table contains information.
One important objective of databases and in particular DBMS is to optimize the performance of queries for access and manipulation of data stored in the database. Given a target environment, an “optimal” query plan can be selected as the best option by a database optimizer (or optimizer). Ideally, an optimal query plan is a plan with the lowest cost (e.g., lowest response time, lowest CPU and/or I/O processing cost, lowest network processing cost). The response time can be the amount of time it takes to complete the execution of a database operation, including a database request (e.g., a database query) in a given system. In this context, a “workload” can be a set of requests, which may include queries or utilities, such as, load that have some common characteristics, such as, for example, application, source of request, type of query, priority, response time goals, etc.
In view of the prevalence of databases in various aspects life today and importance of optimization of database operations, it is apparent that techniques relating to optimization of databases would be very useful.